package com.kaifamiao.wendao.entity;

import java.time.LocalDateTime;
import java.util.List;

public class Topic {

    // 对象标识(zhi)符 对应数据库表中的主键
    private Integer id ;
    // 标题
    private String title ;
    // 内容
    private String content ;
    // 发布时间
    private LocalDateTime publishTime ;
    // 发布者IP地址
    private String publishIp ;
    // 发布者(在数据库中是通过外键来表示的)
    private Customer publisher ; // 维护从 Topic 到 Customer 的 多对一 关联关系
    // 当前话题下所有的评论
    private List<Comment> comments ; // 维护从 Topic 到 Comment 的 一对多 关联关系

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    public LocalDateTime getPublishTime() {
        return publishTime;
    }

    public void setPublishTime(LocalDateTime publishTime) {
        this.publishTime = publishTime;
    }

    public String getPublishIp() {
        return publishIp;
    }

    public void setPublishIp(String publishIp) {
        this.publishIp = publishIp;
    }

    public Customer getPublisher() {
        return publisher;
    }

    public void setPublisher(Customer publisher) {
        this.publisher = publisher;
    }

    public List<Comment> getComments() {
        return comments;
    }

    public void setComments(List<Comment> comments) {
        this.comments = comments;
    }

}
